package com.springcloud.order.openfeign;

import com.springcloud.order.downgrade.UserClientFallback;
import com.springcloud.order.downgrade.UserClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

//@FeignClient(value = "user-server", fallback = UserClientFallback.class)
@FeignClient(value = "user-server", fallbackFactory = UserClientFallbackFactory.class)
@Component
public interface UserClient {

    @GetMapping("/user/get/{id}")
    String getUser(@PathVariable("id") String id);

}
